  <div class="list-div">
    <!--   商品信息 -->
    <table cellpadding="3" cellspacing="1">
      <tr>
        <th width="100">商品名称</th>
        <td id="goods_name">{$goods.goods_name}</td>
      </tr>
      <tr>
        <th>商品编号</th>
        <td id="goods_sku">{$goods.goods_sku}</td>
      </tr>
      <tr class='none'>
        <th>商品分类</th>
        <td id="goods_cat">{$goods.cat_name}</td>
      </tr>
      <tr class='none'>
        <th>商品品牌</th>
        <td id="goods_brand">{$goods.brand_name}</td>
      </tr>
      <tr>
        <th>商品价格</th>
          <td id="add_price"><input type="radio" name="add_price" value="{$goods.market_price}">市场价 [{$goods.market_price}]<br>
            <input type="radio" name="add_price" value="{$goods.shop_price}" checked="">本店价 [{$goods.shop_price}]<br>
            <input type="radio" name="add_price" value="{$goods.preferential_price2}">梯度3价格 [{$goods.preferential_price}]<br>
            <input type="radio" name="add_price" value="user_input">自定义价格<input type="text" name="input_price" value=""><br>
          </td>
      </tr>
<!--       最组合包含商品 -->
      {if $goods.compose}
      <tr>
        <th>最组合包含商品 <br/>
          <span onclick="$('.compose_stock').toggle();">显示库存</span></th>
        <td >
           {foreach from=$goods.compose item=compose}
            <div style="width:500px; float: left;">{$compose.goods_name} <span style="color:#b81b1b">{$compose.goods_number}</span></div>  
            <span class="compose_stock" {if $compose.goods_stock eq 0 } style="color:#bd0707"      {/if }>库存（{$compose.goods_stock}）</span>
            <br/>
          {/foreach}
        </td>
      </tr>
      {/if}

      <!-- 最组合属性 -->
      {if $goods.compose_attr}
      <tr>
        <th>最组合可选颜色
          <br/>
          <span style="color:#b81b1b; font-size:20px;">选择{$goods.compose_color_num}种颜色</span>
          <br/>
          已选择<span id="compose_color_number">0</span>种颜色
          <br/>
          <span class="name_list"></span>
        </th>
        <td id="goods_attr">
          <input type="hidden" value="1{$goods.compose_note}" name="compose_note">
           {foreach from=$goods.compose_attr item=attr}
           {if $attr.goods_stock neq 0}
            <div style="width:160px; float:left" class="compose_color_num"><input type="text" name="attr[{$attr.attr_sku}]" sku="{$attr.attr_sku}" style="width:40px;" onblur="up_num();" onchange="stock(this);"><span class='color_name'>{$attr.attr_value}</span> <span style="color:#b81b1b" class="stock">{$attr.goods_stock}</span></div>
            {/if}
          {/foreach}
        </td>
      </tr>
  <script language="JavaScript">
  function up_num(){
      var new_num=0;
      var name_list='';
      $('.compose_color_num').each(function(){
            var num=parseInt($(this).find('input').val());
            var name=$(this).find('.color_name').html();
                if(num>0){
                  new_num=new_num+num;
                  name_list=name+'*'+num+"<br/>"+name_list;
                  $('.name_list').html(name_list);
                  $('#compose_color_number').html(new_num);
                }            
          });
  }
</script>
      {/if}
      <!-- 单品属性 -->
      {if $goods.attr_list}
      <tr>
        <th>商品属性<input type="hidden" name="spec_count" value="0" /></th>
        <td id="goods_attr">
           {foreach from=$goods.attr_list item=attr}
            {if $attr.attr_stock neq 0}
           <div style="width:160px; float:left"> <input type="text" name="attr[{$attr.attr_sku}]" sku="{$attr.attr_sku}" style="width:40px;" onkeyup="stock(this);" >{$attr.attr_value} <span style="color:#b81b1b" class="stock">{$attr.attr_stock}</span></div>
            {/if}
          {/foreach}
        </td>
      </tr>

      {else}
      <tr>
        <th>商品库存</th>
        <td>{$goods.goods_stock}</td>
      </tr>
      <tr>
        <th>{$lang.goods_number}</th>
        <td><input name="add_number" type="text" value="1" size="10"{if $from_ad neq 1} onkeyup="up_price(this);" {/if}></td>
      </tr>
      {/if}
      <tr>
        <td colspan="2" align="center"><input name="add_goods" type="submit" value="加入订单" /></td>
      </tr>
    </table>
    </div>